package com.yangle.shell.util;

import com.yangle.shell.vo.ProductRequestVo;

/**
 * Author: yangle
 * Create Data: 2020/12/4
 */
public class ProductRequestVoUtil {

    public static ProductRequestVo success(Object data){
        ProductRequestVo productRequestVo = new ProductRequestVo();
        productRequestVo.setCode(0);
        productRequestVo.setMessage("success");
        productRequestVo.setData(data);
        return productRequestVo;
    }

    public static ProductRequestVo success(){
        return success(null);
    }

    public static ProductRequestVo fail(){
        ProductRequestVo productRequestVo = new ProductRequestVo();
        productRequestVo.setCode(1);
        productRequestVo.setMessage("fail");
        productRequestVo.setData(null);
        return productRequestVo;
    }
}
